<div class="container">
	<div class="row-fluid">
		<div class="span8">
			<?php foreach($errors as $error): ?>
			<div class="alert alert-error"><?php echo $error; ?></div>
			<?php endforeach; ?>
			<form class="form-horizontal" method="post" action="/ask">
				<fieldset>
					<legend>Ask a Question</legend>
					<div class="control-group">
						<label class="control-label" for="title">Your Question</label>
						<div class="controls">
							<input type="text" class="input-xlarge" name="title" value="<?php 
							echo isset($_POST['title']) ? $_POST['title'] : NULL; ?>" />
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="detail">Details</label>
						<div class="controls">
							<?php echo jquery()->field()
								->wysiwyg('detail', isset($_POST['detail']) ? $_POST['detail'] : NULL)
								->setOptions('width', '320px')
								->setOptions('toolbar', array(
									array('Maximize',
									'-', 'Bold', 'Italic', 'Underline', 'Strike',
									'-', 'NumberedList', 'BulletedList', 
									'-', 'Code', 'Blockquote', 
									'-', 'Image', 'Table')))
								->setOptions('extraPlugins', 'syntaxhighlight')
								->setOptions('contentsCss', '/assets/styles/bootstrap.css'); ?>
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label" for="tags">Tags</label>
						<div class="controls">
							<?php echo jquery()->field()->tags('tags[]', $tags); ?>
						</div>
					</div>
				</fieldset>
				<div class="form-actions">
					<button type="submit" class="btn btn-primary btn-large">Post Question</button>
				</div>
			</form>
		</div>
		<?php include(__DIR__.'/_right.phtml'); ?>
	</div>
</div>